package com.hk.bean;

/**
 * @author yellow Docter
 * @date 2023 -10-09
 * @desc
 *    1、所有的 类 都默认有一个空构造器
 *    2、如果有有参数的构造器、默认的空构造就消失
 */
public class User {

    private String username;
    private Integer age;

    public User(){}

    public User(String username, Integer age) {
        this.username = username;
        this.age = age;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "User{" +
                "username='" + username + '\'' +
                ", age=" + age +
                '}';
    }
}
